//
//  UIView+ACProperty.h
//  ACFramework
//
//  Created by caoyq on 2018/11/22.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^ActionBlock)(UIButton *btn);

/**
 * 给view添加属性以及按钮点击事件
 */
@interface UIView (ACProperty)

@property (nonatomic, assign) CGFloat ac_x;
@property (nonatomic, assign) CGFloat ac_y;
@property (nonatomic, assign) CGFloat ac_bottom;
@property (nonatomic, assign) CGFloat ac_right;
@property (nonatomic, assign) CGFloat ac_centerX;
@property (nonatomic, assign) CGFloat ac_centerY;
@property (nonatomic, assign) CGFloat ac_width;
@property (nonatomic, assign) CGFloat ac_height;
@property (nonatomic, assign) CGPoint ac_origin;
@property (nonatomic, assign) CGSize  ac_size;

@property (nonatomic, assign) IBInspectable CGFloat ac_cornerRadius;
@property (nonatomic, assign) IBInspectable CGFloat ac_borderWidth;
@property (nonatomic, strong) IBInspectable UIColor *ac_borderColor;

///给UIButton添加点击事件并用block回调
- (void)ac_addAction:(ActionBlock)block;

@end

NS_ASSUME_NONNULL_END
